﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wyn.PMS.Logic.Business;

namespace Wyn.PMS.Test.Cache
{
    class RealTimeStateTest
    {
        public static void Test(string hotelId)
        {
            RoomService roomService = new RoomService();

            var states = roomService.GetOperationStatus(hotelId);//华沙 5180483 

            Console.WriteLine("------------------营业状态 START------------------");

            foreach(var state in states)
            {
                Type type = state.GetType();

                foreach (var t in type.GetProperties(
                    ))
                {
                    var attValue = t.GetValue(state, null);

                    Console.Write("{0}:{1} | ", t.Name, attValue);

                }
                Console.WriteLine("\r\n");
            }

            Console.WriteLine("------------------营业状态 END------------------");
            
            Console.ReadKey();

            Console.WriteLine("------------------酒店实时状态 START------------------");

            var hotelstates = roomService.GetRealTimeHotelStatus(hotelId);//华沙 5180483   

            foreach (var state in hotelstates)
            {
                Type type = state.GetType();

                foreach (var t in type.GetProperties(
                    ))
                {
                    var attValue = t.GetValue(state, null);

                    Console.Write("{0}:{1} | ", t.Name, attValue);

                }
                Console.WriteLine("\r\n");
            }

            Console.WriteLine("------------------酒店实时状态 END------------------");
            
        }
    }
}
